package polimi.disttest.manager;

public class MachineSSHAddress {
	private String username;
	private String host;
	private Integer port;
	private Integer numBrokers;
	private String password;
	


	public MachineSSHAddress(String username, String host, Integer sshPort, Integer numBrokers,String password) {
		this.username = username;
		this.password=password;
		this.host = host;
		this.port = sshPort;
		this.numBrokers = numBrokers;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public Integer getNumBrokers() {
		return numBrokers;
	}
	
	public String getUsername() {
		return username;
	}
	
	public String getHost() {
		return host;
	}
	
	public Integer getPort() {
		return port;
	}
	
	public String sshAddress() {
		return "-p " + port + " " + username + "@" + host;
	}
	
	public String toString() {
		return sshAddress();
	}
	
	public int hashCode() {
		return sshAddress().hashCode();
	}
	
	public boolean equals(Object o) {
		return o.hashCode() == hashCode();
	}
}